Optimal. Leaf size=47 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d \sqrt{a-b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0329305, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3661, 377, 203} \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d \sqrt{a-b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3661
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{a+b \cot ^2(c+d x)}} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{\sqrt{a-b} d}\\ \end{align*}
Mathematica [B] time = 0.418421, size = 111, normalized size = 2.36 \[ -\frac{\cot (c+d x) \sqrt{\frac{b \cot ^2(c+d x)}{a}+1} \tanh ^{-1}\left (\frac{\sqrt{-\frac{(a-b) \cot ^2(c+d x)}{a}}}{\sqrt{\frac{b \cot ^2(c+d x)}{a}+1}}\right )}{d \sqrt{-\frac{(a-b) \cot ^2(c+d x)}{a}} \sqrt{a+b \cot ^2(c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.027, size = 68, normalized size = 1.5 \begin{align*} -{\frac{1}{d{b}^{2} \left ( a-b \right ) }\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( dx+c \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( dx+c \right ) \right ) ^{2}}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.14564, size = 558, normalized size = 11.87 \begin{align*} \left [-\frac{\sqrt{-a + b} \log \left (-2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} - 2 \,{\left ({\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b\right )} \sqrt{-a + b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right ) + a^{2} - 2 \, b^{2} + 4 \,{\left (a b - b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )\right )}{4 \,{\left (a - b\right )} d}, -\frac{\arctan \left (-\frac{\sqrt{a - b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right )}{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b}\right )}{2 \, \sqrt{a - b} d}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a + b \cot ^{2}{\left (c + d x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{b \cot \left (d x + c\right )^{2} + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]